<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><title>用户应用 - <?= $user['username'] ?></title>
<link rel="stylesheet" href="/layui/css/layui.css"><script src="/static/js/jquery.min.js"></script><script src="/layui/layui.js"></script>
<style>body{background:#f5f5f5;padding:20px;}</style></head>
<body>
<div class="layui-card"><div class="layui-card-header">用户「<?= $user['username'] ?>」的应用列表 <a href="/admin/user/index" class="layui-btn layui-btn-xs layui-btn-primary" style="float:right;">返回用户列表</a></div>
<div class="layui-card-body"><table class="layui-table" lay-size="sm"><thead><tr><th>应用名称</th><th>AppID</th><th>AppKey</th><th>剩余次数</th><th>到期时间</th><th>状态</th></tr></thead>
<tbody><?php foreach($apps as $app): ?><tr><td><?= $app['name'] ?></td><td><?= $app['app_id'] ?></td><td><?= $app['app_key'] ?></td><td><?= $app['remain_calls'] ?></td><td><?= $app['expire_time'] ?: '-' ?></td><td><?= $app['status']?'<span style="color:green">启用</span>':'<span style="color:red">禁用</span>' ?></td></tr><?php endforeach; ?><?php if(empty($apps)):?><tr><td colspan="6" style="text-align:center;color:#999;">暂无应用</td></tr><?php endif;?></tbody></table></div></div>
</body></html>